<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<#include "lib/lib.html" />
<title>财务中心</title>
</head>
<body>
	<nav class="breadcrumb">
	 	 <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 财务中心 <span class="c-gray en">&gt;</span> 用户洗车消费明细
		 <a  class="btn btn-success radius r mr-20"  style="line-height: 1.6em; margin-top: 3px" href="javascript:location.replace(location.href);" title="刷新">
		 <i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
	<div class="pd-20 text-c">
		<div class="text-c">
			<form action="${basePath}/userOrder/orderList.do">
			<div class="text-c" style="padding-bottom: 15px">
				<input type="text" name="orderNo" id="orderNo" placeholder="订单流水" value='${map.orderNo}' style="width: 200px" class="input-text">
				<input type="text" name="linkMan" id="linkMan" placeholder="联系人" value='${map.linkMan}' style="width: 200px" class="input-text">
				<input type="text" name="linkTel" id="linkTel" placeholder="联系电话" value='${map.linkTel}' style="width: 200px" class="input-text">
				支付状态<select  name="payStatus" style="width: 150px;height: 29px;">
					<option value="">请选择</option>
					<option value="1" <#if map.payStatus==1>selected</#if>>未支付</option>
					<option value="2" <#if map.payStatus==2>selected</#if>>已支付</option>
					<option value="3" <#if map.payStatus==3>selected</#if>>失败</option>
				</select>
			</div>
			<div class="text-c">	
				是的分派<select  name="orderIsassign" style="width: 150px;height: 29px;">
					<option value="">请选择</option>
					<option value="1" <#if map.orderIsassign==1>selected</#if>>是</option>
					<option value="2" <#if map.orderIsassign==2>selected</#if>>否</option>
				</select>
				订单状态<select  name="orderStatus" style="width: 150px;height: 29px;">
					<option value="">请选择</option>
					<option value="1" <#if map.orderStatus==1>selected</#if>>未开始</option>
					<option value="2" <#if map.orderStatus==2>selected</#if>>开始服务</option>
					<option value="3" <#if map.orderStatus==3>selected</#if>>服务完成</option>
					<option value="10" <#if map.orderStatus==10>selected</#if>>订单取消</option>
					<option value="20" <#if map.orderStatus==20>selected</#if>>申请退款</option>
					<option value="21" <#if map.orderStatus==21>selected</#if>>完成退款</option>
					<option value="30" <#if map.orderStatus==30>selected</#if>>已结算</option>
				</select>
				退款审核<select  name="examineStatus" style="width: 150px;height: 29px;">
					<option value="">请选择</option>
					<option value="0" <#if map.examineStatus==-1>selected</#if>>洗车工审核</option>
					<option value="0" <#if map.examineStatus==0>selected</#if>>不用审核</option>
					<option value="1" <#if map.examineStatus==1>selected</#if>>等待审核</option>
					<option value="2" <#if map.examineStatus==2>selected</#if>>通过</option>
					<option value="3" <#if map.examineStatus==3>selected</#if>>不通过</option>
				</select>
				<button name="" id="" class="btn btn-success" type="submit"> <i class="Hui-iconfont">&#xe665;</i> 搜索 </button>
			</div>
			</form>
		</div>
<!-- 		<div class="cl pd-5 bg-1 bk-gray mt-20"> -->
<!-- 			<span class="l"> -->
<!-- 				<a class="btn btn-primary radius" onclick="adm_test()" href="javascript:;"> -->
<!-- 				<i class="Hui-iconfont">&#xe600;</i> 结算</a></span> <span class="r">  -->
<!-- 			</span> -->
<!-- 		</div> -->
		<div class="mt-20">
			<div id="page" class="holder"></div>  
			<table class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						<th>订单号</th>
						<th>订单名称</th>
						<th>总金额</th>
						<th>支付金额</th>
						<th>赠送金额</th>
						<th>车牌号</th>
						<th>车辆品牌</th>
						<th>车辆颜色</th>
						<th>联系人</th>
						<th>联系电话</th>
						<th>支付方式</th>
						<th>支付状态</th>
						<th>是否分派</th>
						<th>订单状态</th>
						<th>退款审核状态</th>
						<th>预约服务时间</th>
						<th>服务时间</th>
						<th>服务地址</th>
						<th>创建时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<#if list.dataList?? && list.dataList?size gt 0>
					<#list list.dataList as dl >
						<tr class="text-c">
							<td>${dl.orderNo!}</td>
							<td>${dl.orderName!}</td>
							<td>${dl.orderBalance / 100}</td>
							<td>${dl.rechargeBalance / 100}</td>
							<td>${dl.giveBalance / 100}</td>
							<td>${dl.carCode!}</td>
							<td>${dl.carBrand!}</td>
							<td>${dl.carColor!}</td>
							<td>${dl.linkMan!}</td>
							<td>${dl.linkTel!}</td>
							<td>
								<#if dl.rechargeType == 1>
									微信
								<#else>
									余额
								</#if>
							</td>
							<td>
								<#if dl.payStatus == 1>
									未支付
								<#elseif dl.payStatus == 2>
									已支付
								<#else>
									失败
								</#if>
							</td>
							<td>
								<#if dl.orderIsassign == 1>
									是
								<#else>
									否
								</#if>
							</td>
							<td>
								<#if dl.orderStatus == 1>
									未开始
								<#elseif dl.orderStatus == 2>
									开始服务
								<#elseif dl.orderStatus == 3>
									服务完成
								<#elseif dl.orderStatus == 10>
									订单取消
								<#elseif dl.orderStatus == 20>
									申请退款
								<#elseif dl.orderStatus == 21>
									退款完成
								<#else>
									已结算
								</#if>
							</td>
							<td>
								<#if dl.examineStatus == -1>
									洗车工审核
								<#elseif dl.examineStatus == 0>
									不用审核
								<#elseif dl.examineStatus == 1>
									等待审核
								<#elseif dl.examineStatus == 2>
									通过
								<#else>
									不通过
								</#if>
							</td>
							<td>${dl.bespokeBeginTime?string('yyyy-MM-dd')}-${dl.bespokeEndTime?string('yyyy-MM-dd')}</td>
							<td>${dl.orderBeginTime?string('yyyy-MM-dd')}-${dl.orderEndTime?string('yyyy-MM-dd')}</td>
							<td>${dl.areaName!} ${dl.areaAddress!}</td>
							<td>${dl.createTime?string('yyyy-MM-dd')}</td>
							<td>
								<#if dl.orderStatus==20 && dl.examineStatus ==1>
									<a title="通过" href="javascript:;" onclick="adm_edit(this,${dl.id!},2)" class="ml-5" style="text-decoration:none">通过</a>
									<a title="不通过" href="javascript:;" onclick="adm_edit(this,${dl.id!},3)" class="ml-5" style="text-decoration:none">不通过</a>
								</#if>
								<a style="text-decoration:none" onClick="adm_find('查看','${basePath}/userOrder/findOrderInfo.do?id=${dl.id!}','800','500')" href="javascript:;" title="查看"><i class="Hui-iconfont">&#xe665;</i></a>
							</td>
						</tr>
					</#list>
					</#if>
				</tbody>
			</table>
			</br>
			<div class="page_list"></div>
		</div>
	</div>
	<script type="text/javascript">
	$(function(){
	 	laypage({
	 	    cont: $('.page_list'), //容器。值支持id名、原生dom对象，jquery对象,
		    pages: ${list.endPage! }, //总页数
	 	    //skip: true, //是否开启跳页
// 	    	skin: 'molv',
	 	    groups: 10, //连续显示分页数
	 	    first: '首页', //若不显示，设置false即可
	 	    last: '尾页', //若不显示，设置false即可
	 	    curr:${list.curPage!},
	 	   	hash: true, //开启hash
	 	    skin: '#00AA91',
	 	    jump: function(obj,first){ //触发分页后的回调
// 	 	       $('.view').html('目前正在第'+ obj.curr +'页，一共有：'+ obj.pages +'页');
	 	    	if(!first){
	 	         	 window.location.href="${basePath}/userOrder/orderList.do?curPage="+obj.curr +"&pageData="+10;
	 	    	}
	 	    }
	 	});
	});
	//状态操作
	function adm_edit(obj, id,status) {
		var name = '确认要审核通过吗?';
		if(status == 3){
			name = '确认要审核失败吗?';
		}
		layer.confirm(name, function(index) {
			var data = {};
			data.id = id;
			data.status = status;
			//后台请求保存数据
			$.axse("${basePath}/userOrder/examine.do",  data, function(d){
				if(d.resultCode == 200){
					layer.msg('成功!', {
						icon : 1,
						time : 1000
					});
					location.replace(location.href);
				}else{
					layer.msg('操作失败,请重试!', {
						icon : 1,
						time : 1000
					});
				}
			},
			function(d){
				layer.msg('操作失败,请重试!', {
					icon : 1,
					time : 1000
				});
			});
		});
	}
	//查看
	function adm_find(title, url, w, h){
		layer_show(title, url, w, h);
	}
	function adm_test() {
		layer.confirm("结算", function(index) {
			var data = {};
			//后台请求保存数据
			$.axse("${basePath}/userOrder/test.do",  data, function(d){
				if(d.resultCode == 200){
					layer.msg('成功!', {
						icon : 1,
						time : 1000
					});
					location.replace(location.href);
				}else{
					layer.msg('操作失败,请重试!', {
						icon : 1,
						time : 1000
					});
				}
			},
			function(d){
				layer.msg('操作失败,请重试!', {
					icon : 1,
					time : 1000
				});
			});
		});
	}
	</script>
</body>
</html>